#include "v3d_defs.h"

#include "v3d_renderer.h"
#include "gl_renderer.h"


V3D_RENDERER_TYPE V3dRenderer::renderer_type = RENDERER_GL;
V3dRenderer *V3dRenderer::I = NULL;

void V3dRenderer::Init()
{
	renderer_type = V3D_RENDERER_TYPE_DEFAULT;
	LOG("v3d_renderer init called ... \n");
	if(renderer_type == RENDERER_GL)
	{
		I = new GlRenderer();
		I->InitRenderer();
	}

}

#include "v3d_interface.h"
#include "glut_interface.h"
#include "sdl_interface.h"

V3D_WINDOW_TYPE V3dInterface::window_type = WINDOW_TYPE_GLUT;
V3dInterface *V3dInterface::I = NULL;

void V3dInterface::Init()
{
	LOG("v3d_interface init called ... \n");
	V3dInterface::window_type = V3D_WINDOW_TYPE_DEFAULT;		//temply setting here

	switch(window_type)
	{
	case WINDOW_TYPE_GLUT:
		{
			I = new GlutInterface();
		}
		break;
	case WINDOW_TYPE_SDL:
		{
			I = new SdlInterface();
		}
		break;
	}

	if(window_type != WINDOW_TYPE_NONE)
	{
		I->InitWindow();
	}
}

